<html>
<head>
<title>random test</title>
<script src="../trunk/classic.js"> </script>
<script>
var cl= console.log,
	json= JSON.stringify;
function clj( e){
	console.log(JSON.stringify(e));
}

field = sdkSlice(rules.predefined[0]);

function sdkChangeSingle( cmd, cellID, candidID){
	return {
		cmd: cmd,
		cellID:cellID,
		candidID: candidID,
		exec: function( slice){
			slice=sdkSlice( slice.concat());
			var a = slice.filterByID( cellID);
			if( cmd === "swap"){
				a=a.swap( candidID, true);
			}
			if( cmd === "only"){
				a=a.only( candidID, true);
			}
			a=a.concat( slice.filterNotID(cellID));
			return sdkSlice(a);
		}
	};
}

function sdkChange( arg){
	if( arguments.length > 1){
		return sdkChange([ sdkChangeSingle.apply(undefined, arguments)]);
	} else {
		arg.exec = function( arr){
			arr = arr.concat();
			this.forEach(function( elem){
				arr= elem.exec(arr);
			});
			return arr;
		};
		return arg;
	}
}

var c0= sdkChange("swap","c01","6");

</script>
</head>
<body>


</body>
</html>